<?php
$link = mysqli_connect("localhost","root","root","2113");
$id=$_GET['id'];
$sql = "SELECT * FROM products WHERE id=$id";
$res =  mysqli_query($link,$sql);
$arr =  mysqli_fetch_assoc($res);
echo json_encode($arr);
?>